Device, system, and method of detecting overlay malware

ABSTRACT

Devices, systems, and methods to detect malware, particularly an overlay malware that generates a fake, always-on-top, masking layer or an overlay component that attempts to steal passwords or other user credentials. A defensive module protects a victim application, particularly of an electronic device having a touch-screen. The defensive module generates a transparent or invisible always-on-top layer of its own; and periodically injects automatically-generated non-human tap events or touch-gesture events, and checks whether the injected events are indeed received, in order to determine whether an overlay malware is active.

FIELD OF THE INVENTION

The present invention relates to the field of security of electronic devices.

BACKGROUND

Millions of people worldwide utilize various electronic devices, for example, smartphones, tablets, laptop computers, gaming devices, or the like. Some electronic devices are equipped with a touch-screen, which operates as a combined output unit and input unit: it displays text and graphics as output, and it senses touch gestures of the human user as input.

Electronic devices are utilized on a daily basis for various purposes; for example, to read or consume online content, to send and receive electronic mail (email) messages, to engage in a video conference, to engage in Instant Messaging (IM), to play games, to browse the World Wide Web, to engage with a dedicated “app” or mobile application of a particular service provider, and/or for other purposes.

SUMMARY

The present invention may include, for example, devices, systems, and methods to detect malware, particularly a malware that operates as or that utilizes a masking layer or fake layer or an overlay component (e.g., top-most layer or window or tab or interface, or always-on-top layer or window or tab or interface) on an electronic device having a touch-screen; particularly for the purpose of replacing a log-in User Interface (UI) of an application, with a fake, illegitimate, always-on-top log-in UI as part of a “phishing” attack in order to steal user credentials.

In some embodiments, a defensive module of a protected application creates its own invisible or transparent top-most layer or always-on-top layer, and artificially injects onto it periodic touch-events or tap-events or other touch-based gestures, which are simulated or emulated or introduced by the defensive module (e.g., without the need for the user to actually tap or touch any on-screen location). The defensive module then immediately checks, whether the injected touch-screen event was sensed or registered. If the recently-injected touch-event or tap-event is not detected as actually sensed or as actually received, then the defensive module determines that a malware that replaces or hijacks the top-most layer is active and operational.

The present invention may provide other and/or additional benefits or advantages.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration of a system, in accordance with some demonstrative embodiments of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The term “electronic device” as used here may comprise, for example, a smartphone, a tablet, a gaming device, a laptop computer, a notebook computer, an electronic device having a touch-screen or a multi-touch screen, an Internet-of-Things (IoT) device, a wireless-connected device, an Internet-connected device, an Augmented Reality (AR) device, a Virtual Reality (VR) device, a wearable device, a smart-watch, an electronic fitness accessory, or the like.

The terms “malware” or “malware module” as used herein may comprise, for example, any suitable malware module or malware module or malware component, computerized virus, computerized Trojan, software-based malware, hardware-based malware, illegitimate code, illegal code, attack code, cyber-attack code, code or code-portion or module or unit which operates to illegitimately and/or illegally and/or secretly and/or fraudulently attack or harm a legitimate (naïve, rightful) user of an electronic device or that intends to steal data or steal assets from such legitimate user or that attempts to damage the electronic device or that attempts to otherwise abuse the electronic device for illegal purposes and/or illegitimate purposes and/or criminal purposes and/or fraudulent purposes.

The terms “Victim Application” or “Victim App”, as used here, may comprise any “app” or application or mobile application or mobile-friendly application, which is targeted by a malware; and such Victim Application may be, for example, a native app or native application (e.g., downloaded from an “app store” or from a “play store” or other repository of downloadable applications), or may be implemented as a mobile-friendly version of a web-site or a web-page (e.g., utilizing HTML5 and/or JavaScript and/or CSS).

The terms “Protected Application” or “Protected App”, as used herein, may refer to a Victim Application that is configured, augmented, or otherwise modified, in accordance with the present invention, to become resilient against malware, or to become secure or more secure than a non-modified Victim Application, or to become protected against a malware module, particularly against an overlay malware module as described herein.

The present invention comprises devices, systems, and methods for detecting, preventing and/or mitigating a particular type of attacks against electronic devices, and particularly devices having a touch-screen.

The Applicants have realized that a touch-screen device is exposed to an attack or a security risk which may be referred to as an “overlay attack”. For example, the Android operating system (OS) enables a developer to create an Always-On-Top element or component or layer or overlay, which may mask or hide one or more other applications that may be running on the device. The Applicants have realized that in this type of attack, the genuine (legitimate, real) human user is attempting to engage with a target service (e.g., a website or a “mobile app” of a banking service or a retailer), for example by launching a mobile “app” of the service or by browsing to a URL or web-page of the service. An Attacker may utilize a virus or malware, for example, installed or residing on the end-user device, in order to create an additional “overlay” layer or element or app, which is defined or configured by the attacker to be always-on-top and thus hide or mask the real (the true) application or web-page underneath it. The attack layer that is displayed on the screen, always-on-top, may contain User Interface elements that resemble the true log-in page or the true log-in interface of the real service, for example, by displaying in the overlay layer a false or fake interface that shows the name or logo of the real website (e.g., bank or retailer), as well as username/password fields and a “submit” (or “login”) button that resemble those of the real website. Accordingly, the legitimate user of the touch-screen device, instead of engaging with the real web-page or the real “app” of the service, is engaging with the attack module that displays the attack layer always-on-top; and the legitimate user is thus tricked or defrauded into entering his credentials into the attack module, which in turn abuses or steals the credentials; for example, the attach module collects the credentials that were entered by the legitimate user into the fake interface of the always-on-top overlay, and sends the credentials via a wireless link to a remote server or a remote device or a remote email address that is controlled by the attacker.

The Applicants have further realized that such an attack may be performed by an attacker, for example, by carrying out the following attack steps. (1) A malware module is installed on the electronic device, for example, by tricking the legitimate user into downloading the malware as an “app” or application, or by providing the malware module as an internal part or integral part of an otherwise useful app or application (e.g., a “Flashlight” mobile app). (2) The malware module creates a background service, which monitors and tracks the launching of other applications on that device, and which is pre-configured by the attacker to spring into action once a particular application or web-page is launched or accessed (e.g., once the Citibank (RTM) app is launched), or once an application that is on a list of several applications is launched (e.g., a banking application from a list of several banking applications); such detected application, which is the target of the attack, is referred to as the “Victim Application”. (3) Upon detection by the background service of the malware module, that the Victim Application is launched and/or is accessed, the malware module creates or generate a UI component or a set of UI elements, particularly an Overlay masking layer (or window, or tab, or other UI element) or an always-on-top layer (or window, or tab, or other UI element) or a TYPE SYSTEM OVERLAY element or layer, which covers the entire screen of the device (or, which covers at least the UI of the Victim Application), and which contains a “phishing”, fake, illegitimate, log-in page (e.g., a username field, a password field, a Submit or Login button). (4) The legitimate user, who has just launched the Victim Application, sees the always-on-top layer which looks like the genuine log-in page of the Victim Application, although it is actually the “phishing” interface of the always-on-top malware layer, and is thus tricked or defrauded into entering his credentials. (5) The malware module collects the entered credentials that the user entered; and sends them to a remote server or a remote device or a remote email address that is controlled by the attacker. (6) Optionally, the malware module may report back to the legitimate user that “login has failed”, and may invite the user to close all applications and to try logging-in again.

The Applicants have developed a system that prevents, detects, stops and/or mitigates the above-described type of attacks. In accordance with the present invention, for example, the Victim Application is modified or is augmented or is configured by a Defensive Module, whose purpose is to prevent, detect, stop and/or mitigate such attacks. The defensive module may be an integral part or internal part of the Victim Application (e.g., downloaded and installed together with the Victim Application as an integral part thereof); or, the defensive module may be an add-on or plug-in or extension to the Victim Application (e.g., particularly if the Victim Application is a web browser or other application that may have extensions or plug-ins or add-ons); or the defensive module may be a stand-alone application or “app” which may monitor interactions and/or events on the electronic device, not necessarily integrated within the Victim Application. In accordance with the present invention, a conventional Victim Application (that is typically exposed to be compromised by an Overlay Malware) which is modified or augmented or assisted by a Defensive Module, becomes (and may be referred to as) a Protected App or a Protected Application.

Reference is made to FIG. 1, which is a schematic block-diagram illustration of a system 100, in accordance with some demonstrative embodiments of the present invention. System 100 may be or may comprise an electronic device 110, which may be able to communicate over wireless and/or wired communication links with a remote server 190; for example, over the Internet, over TCP/IP link(s) or network(s), over cellular communication link(s) or network(s), over Wi-Fi or Wi-Max or other wireless communication networks, or the like.

Device 110 may comprise, for example, a processor 111 able to execute code and programs and able to process data; a memory unit 112 able to store data (e.g., RAM memory, Flash memory, or the like); a storage unit 113 able to store data (e.g., an SD memory card); a touch-screen 120 able to display output (e.g., text, graphics, images, photographs, video) and able to receive user input (e.g., on-screen tap or double-tap, on-screen touch, on-screen force-sensitive touch or force-touch, on-screen multi-touch with two or more fingers or with a palm of the hand, on-screen pinching or widening gesture to zoom-in or to zoom-out, or the like); a microphone 121 to capture audio; one or more speaker(s) 122 to output audio; a camera 123 to capture photographs and/or video; a power source 124 (e.g., rechargeable battery) to provide power to other components of the device; a Wi-Fi transceiver (802.11 transceiver) 125; an optional cellular transceiver 126; an optional BlueTooth transceiver 127; a Global Positioning System (GPS) unit or module 128; an Operating System (OS) 129 (e.g., Android, iOS, Windows); one or more applications 130 (or “apps”); and/or other suitable components, hardware units and/or software units.

As demonstrated, a Victim Application 141 may reside in device 110; for example, a banking application that was installed by a legitimate user of the device, or a retailer application that was installed by the legitimate user of the device or that came pre-installed on the device 100 when it was purchased by the user. Furthermore, a Malware Module 199 may exist or may reside in device 110, often without the knowledge or awareness of the legitimate user or owner of the device 110. The Malware Module 199 operates by creating a Malicious Overlay 198 (or fraud overlay, or attack overlay, or illegitimate overlay, or “phishing” overlay, or credentials-stealing overlay, or masking overlay), which hides or covers or masks or replaces some or all of the User Interface (or content) that is produced by the Victim Application 141, typically with a fake “phishing” UI whose purpose is to steal user credentials.

In accordance with the present invention, a Defensive Module 142 may reside in device 110 and/or may operate within device 110; for example, as a stand-alone module or unit, or as a unit separate from the Victim Application 141, or as a module that is integrated with the Victim Application 141 such that the combination of the Defensive Module 142 with the original Victim Application 141 is regarded as a Protected Application 143.

The Defensive Module 142 operates concurrently with, and in parallel to, the regular operation of the Victim Application 141. The Defensive Module 142 creates or generates or introduces (e.g., by utilizing a Protective Overlay Generator 146) a Protective Overlay 145 or other element or overlay or layer or protective layer, which is defined as a top-most or an always-on-top layer or element, and which is transparent or invisible or hidden and has no visible content and has no visible UI elements.

The Defensive Module 142 then operates to generate or inject (e.g., by utilizing a Touch-Gesture Injector 147) a Tap Event or a touch-event or other suitable touch-screen gesture; by generating and/or executing one or more commands, or code, which emulates or simulates or generates a pre-defined touch-gestures (e.g., a tap) at a pre-defined on-screen location or coordinates.

The touch-gesture or tap events are injected at pre-defined time intervals; for example, every K milliseconds, wherein K may be for example 100 or 500 or 800; or every N milliseconds, wherein N is a pseudo-random number in the range of 200 to 700, selected pseudo-randomly again and again. A time-interval determination unit 148 may be responsible for determining and/or selecting and/or modifying the time interval between such injections; and a time-interval enforcement unit 149 may be responsible for enforcing or applying the currently-selected time interval between such injections, optionally utilizing a real-time clock or a counter to measure the elapsing of time.

The injection or the introducing of the periodic Tap Event, may be performed by utilizing a suitable command, such as by using the InputManager module or command on Android OS, which generates the Tap Event at a particular set of on-screen coordinates or at a particular on-screen location. For example, the size of the touch-screen may be 600 by 900 pixels; and the Tap Event is periodically performed by the Defensive Module at the on-screen location of X=54 and Y=37, wherein the particular on-screen location is of course known to the Defensive Module which generates the periodic Tap Event. The particular on-screen location or the particular on-screen set-of-coordinates, at which the tap event or touch-gesture event is injected or introduced or is emulated or is simulated or is generated, may be determined by an Injection Location Selector 151, which may select or determine such on-screen location based on a pre-defined lookup table or list (e.g., listing sets of on-screen coordinates to be utilized in a consecutive order), or based on a random or pseudo-random selection (e.g., pseudo-randomly selecting an X coordinate and a Y coordinate for the location of the tap event), or based on a pre-defined pattern (e.g., firstly emulating a tap at the center of the screen; then emulating taps in various corners of the screen; then emulating taps in centers of lines that connect the center of the screen with the corners of the screen; or the like).

It is clarified that the human user is not aware of those periodic Tap Events, which are entirely automatic and are entirely machine-generated by a set of commands or instructions executed by the processor and/or touch-screen of the end-user device, and the human user is not required to actually tap periodically and/or manually, and the human user is not required or requested to manually perform any particular on-screen operation or gesture by the Defensive Module. The tap events (or other emulated touch-gesture events) are not visible to the user and are not conveyed to the user in any manner, and they do not cause the electronic device to vibrate or to make an audible sound or to otherwise let the user know of their occurrence.

Immediately upon (and/or continuously in parallel to) performing the periodic Tap Event by the Defensive Module, the Defensive Module also checks whether a Tap was indeed received or sensed by the touch-screen of the device, by utilizing a Received-Gesture Detector 152. Particularly, the Defensive Module checks whether the periodic Tap Event, that was performed by the InputManager module at a particular pre-defined on-screen location (such as (54, 37) in the above example, was indeed registered as a received Tap Event at that particular on-screen location and at the time in which the Tap Event was injected; and not before the tap event; or, not more than M milliseconds after the injection, to compensate for minor system processing delays, wherein M is for example, 1 or 5 or 10 milliseconds; wherein M, for example, is not more than 1 percent or 5 percent or 10 percent of the periodic interval K or N between Tap Events). The permissible delay between the time-point of generating the tap event, and the time-point of sensing or detecting it, may be pre-defined or pre-configured, or may be modified dynamically or may be selected based on operational parameters of the particular device 110 (e.g., taking into accounts its processor speed, RAM memory capacity, or the like).

If the Defensive Module injects the Tap Event at the particular on-screen location, but the Defensive Module does not concurrently or immediately (e.g., within M milliseconds) also senses or receives the Tap Event as an incoming input event, then the Defensive Module determines that the transparent Defensive Module's layer, which is intended and supposed to be the top-most/always-on-top layer, is not actually the top-most/always-on-top layer; namely, that another layer or module that is running on the device, must be running as the top-most/always-on-top layer, and must be receiving the periodically-injected Tap Event that the Defensive Module injects periodically. Accordingly, in such case, the Defensive Module determines that an attack module or a malware is most-probably hijacking or replacing the top-most layer, or that an attack module or malware is injecting a “phishing” always-on-top layer or top-most layer. The detection may be performed by an Overlay-Malware Detector 153, which may be part of the Defensive Module 142.

Upon such detection, the Defensive Module may trigger a Fraud Mitigation Module 154 to perform one or more other operations to stop or mitigate fraud or attacks; for example, to generate a pop-up window or an audio recording that alerts the user that its device is under attack by a malware and that the user should not enter his credentials, and/or the Fraud Mitigation Module may send an immediate signal or message to a remote server of the service (e.g., the server of the banking institution or the retailer) to indicate that this particular account should be immediately and automatically blocked or locked until the legitimate user contacts a fraud department by phone, or the like. For demonstrative purposes, Fraud Mitigation Module 154 is shown as a local unit within device 110; however, Fraud Mitigation Module 154 may alternatively be located externally to device 110, or in remote server 190; or the functions of Fraud Mitigation Module 154 may be divided or distributed across the local device 110 and the remote server 190.

In contrast, if the Defensive Module indeed senses that the Tap Event that was injected, is timely received and sensed as an incoming Tap Event (e.g., within M milliseconds of the tap event being generated), then the Defensive Module determines that its own always-on-top hidden layer is indeed still the top-most layer on the device, thereby deducing that there is currently no active attack by an overlay malware layer. Optionally, every T milliseconds or seconds, the Defensive Module may send a signal to other components of the Victim Application, and/or to a remote server, to indicate that the Defensive Module is active and operational and that no overlay attack is currently being sensed.

In some embodiments, a single injection of a single tap-event or a single touch-event, may be utilized in order to detect and/or determine that an overlay malware is active and/or operational. In other embodiments, multiple such injections may be utilized, in order to reduce or prevent “false positive” detections; for example, due to a legitimate or semi-legitimate masking window or masking UI element that may be active on the end-user device due to a non-malware application other than the Protected Application, such as a Facebook (TRM) Messenger window or tab or layer. In such embodiments, for example a series or a set of two or more such tap-events or gesture-events, as described herein, may be utilized in order to determine or estimate the size and/or ratio and/or dimensions and/or on-screen location and/or other attributes of the suspected masking layer or the suspected always-on-top layer or top-most layer, and in order to distinguish or differentiate between (i) an always-on-top malware module, and (ii) an always-on-top legitimate application other than the Victim Application (or other than the Protected Application). In some embodiments, the defensive module may distinguish or differentiate among (or may separately detect or determine) three scenarios: (I) an always-on-top malware module is active, or (II) an always-on-top legitimate or non-malware module or application (such as Messenger) is active, or (III) no always-on-top module is active except for the always-on-top layer of the defensive module of the Protected Application. The differentiation may be based on one or more estimated attributes of the always-on-top layer, deduced from a series or set of multiple injections of tap-events or touch-events, for example as described herein.

The Defensive Module is able to determine the existence or non-existence of an Overlay Malware, or is able to determine whether such Overlay Malware is currently operational (active) or non-operational (non-active). However, embodiments of the present invention may not merely detect existence and non-existence of such Overlay Malware; but rather, embodiments of the invention may further comprise an Overlay-Malware Attributes Estimator 156 operable to characterize and/or to classify such detected Overlay Malware and/or to deduce or determine its operational attributes.

For example, the on-screen location in which the Tap Event is injected periodically by the Defensive Module, may be modified by the Defensive Module between such Tap Event injections; and data collected from multiple such injections may be used to determine the size of the overlay malware layer (e.g., size of K1 by K2 on-screen pixels, for example it covers 400 by 600 pixels even though the entire screen size is 800×1200 pixels), the size ratio of such overlay malware layer (e.g., it is a rectangle having a perspective ratio of 2:3), the percentage of the size of the screen that it occupies (e.g., the overlay malware layer occupies 75 percent of the full size of the screen), the exact on-screen coordinates or location(s) of the overlay malware layer (which is invisible or transparent and cannot be seen by a human user) for example defined by four X,Y coordinates of four corners of its rectangle (for example, first corner at coordinates (50, 100); second corner at coordinates (50, 220); third corner at coordinates (130, 220); fourth corner at coordinates (130, 100), or the like); and/or which particular on-screen regions or sections or UI elements of the Victim Application are being overlayed by the Overlay Malware (e.g., a rectangular overlay malware layer that is invisibly and transparently located over the Username field and over the Password field and over the Submit button, but does not cover the logo of the banking website or the on-screen menu bar); and/or to determine whether the entirety of the on-screen UI or the entirety of the on-screen content of the Victim Application is overlayed by the malware module, or only a portion of the on-screen UI or content of the Victim Application is overlayed by the malware module. In some embodiments, such detected attributes of the malware module may be automatically sent to a remote security lab or security team, which may collect data from multiple malware incidents in order to further combat the malware module.

In some embodiments, the automatic differentiation between a malware module that masks the victim application, and a third-party non-malware application (e.g., Messenger) that partially or entirely masks the UI of the Protected Application, may be performed based on one or more criteria. For example, the defensive module may automatically capture a screenshot of the touch-screen device having the suspected masking layer; and a computer vision algorithm and/or an image recognition algorithm and/or an Optical Character Recognition (OCR) process (e.g., these may be local to the electronic device, or may reside remotely on a remote server) may be utilized to automatically determine the content of the masking layer. In an example, if the Protected Application is of a particular bank; and the screenshot of the masking layer is analyzed and is determined to show “Please log in to your Messenger account”, then the defensive module determines that the overlay masking layer belongs to a non-malware third-party application, rather than to an active overlay-malw are module.

In some embodiments, the defensive module may utilize a lookup table or a list of pre-defined on-screen coordinates or locations, that correspond to known UI elements of the Victim Application, in order to further characterize the detected (or the suspected) overlay-malware module, and in order to deduce which particular UI elements of the Victim Application are being masked by the overlay malware module. For example, a pre-defined lookup table of the defensive module may indicate that in the Victim Application which is a particular banking application, the bank Logo appears at on-screen coordinates (50, 30); and then the Username field appears 20 pixels below it; and then the Password field appears 45 pixels below it; and then a Submit/Login button appears 50 pixels below it and also offset to the right-side of the screen; and the defensive module may utilize a series of injections of multiple non-human touch-events or tap-events, in order to pin-point and determine which particular UI elements of the Victim Application are (or are not) masked by the overlay malware module. For example, if an injected tap event is indeed received at on-screen location (5, 10), then the defensive module determines that this particular region of the screen is not masked by a malware module; and based on the lookup table of known coordinates of known UI elements or UI components or content components of the Victim Application, the defensive module may determine that said particular on-screen-region (which is unmasked) is occupied by an “About Us” button. Similarly, the defensive module may pin-point its detections based on multiple injections of non-human touch events or tap events, and may selectively determine that, for example, only a Password field of the Victim Application is masked, whereas a Username field of the Victim Application is not masked, by said overlay malware module. Other suitable types of determinations may be automatically performed by the defensive module.

In a demonstrative embodiment, the following non-limiting example of code or pseudo-code, denoted “Code 1: Injection Code”, may be utilized for periodically injecting or introducing a Tap Event or a Touch Event or other touch-gesture event:

Code 1: Injection Code int touchPeriod = 5000; int delay = 0; final float x = 500; final float y = 500; ScheduledThreadPoolExecutor executor = new     ScheduledThreadPoolExecutor(1);     //create a periodical triggered thread executor.scheduleAtFixedRate(new Runnable( ) {   @Override   public void run( ) {     // schedule a periodic task at a fixed interval     try {       long time = java.lang.System.currentTimeMillis( );       InputManager inputManager =      (InputManager)getSystemService(Context.      INPUT_SERVICE);     // get the input manager Method injectInputEventMethod = InputManager.class.getMethod  (“injectInputEvent”, InputEvent.class, Integer.TYPE);     //extract the injection method using reflection       MotionEvent event = MotionEvent.obtain (time, time,          MotionEvent.ACTION_DOWN, x, y, 0);     // create a touch event       event.setEdgeFlags(0xf);     // add parameters, to recognize this event event.setSource(InputDeviceCompat.SOURCE_TOUCHSCREEN);      injectInputEventMethod.invoke(inputManager, event, 0);     // fire the event     }     catch (Throwable e) {       Log.e(“TouchInjection”, e.toString( ));     }   } }, delay, touchPeriod, TimeUnit.MILLISECONDS);

In a demonstrative embodiment, the following non-limiting example of code or pseudo-code, denoted “Code 2: Detection Code”, may be utilized for detecting or sensing or determining whether an already-injected Tap Event or Touch Event or touch-gesture event is indeed sensed or received:

Code 2: Detection Code view.setOnTouchListener(new View.OnTouchListener( ) {       // register a touch listener to any view available   @Override   public boolean onTouch(View v, MotionEvent event) {     if(event.getEdgeFlags( ) == 0xf) {       // is this the event that we triggered?       return true;    // if so, consume it     }     return false;     //else, do not consume   } });

Embodiments of the present invention need not have “Root Access” to the device on which the Defensive Module operates (namely, the device on which the Victim Application is installed and running); and need not be implemented as part of an Operating System or as part of a kernel or a driver; but rather, may be implemented as a user-level application which may be downloaded and installed by a regular, legitimate, post-purchase end-user of the device without “rooting” the device. This may be in direct contrast to some conventional anti-virus or anti-malware modules, which may require Root Access to the device, or which may be installed or added to the device only by the maker of the device, or which may require a risky or illegal or illegitimate or complicated “rooting” of the device by the user

Embodiments of the invention need not read or access any low-level OS log files, which are typically reserved for OS components and are typically not available to third-party user-level applications (e.g., since OS log files may contain private information of the user). Embodiments of the invention need not access or utilize a READ_LOGS command or module of the OS (or similar log-accessing commands or modules or drivers), and/or do not utilize a parameter value or a constant value such as “android.permission.READ_LOGS” (or similar system-log related parameter or constant or pointer).

Embodiments of the invention may operate particularly in devices running Android OS version 4.1 or later, in which user-level applications (e.g., any application that is not pre-defined as a System App or as part of the OS) do not have access or authorization or permission to read or to inspect OS log files.

Embodiments of the invention may detect a “phishing” overlay layer on any suitable version of Android OS; and/or on regardless of whether the device is already “rooted” or “non-rooted”; and/or regardless of having or not having access to system log files; and/or regardless of the Defensive Module or the Victim Application being a user-level application or a system-level application.

The present invention comprises devices, systems, and methods to detect malware, particularly an overlay malware that generates a fake, always-on-top, masking layer or an overlay component that attempts to steal passwords or other user credentials. For example, a defensive module protects a victim application, particularly of an electronic device having a touch-screen. The defensive module generates a transparent or invisible always-on-top layer of its own; and periodically injects automatically-generated non-human tap events or touch-gesture events, and checks whether the injected events are indeed received, in order to determine whether an overlay malware is active.

In some embodiments, a method comprises: automatically detecting that an overlay malware module is active on an electronic device having a touch-screen, wherein the overlay malware module generates a malicious always-on-top masking layer that covers at least a portion of a content displayed by a victim application running on said electronic device.

In some embodiments, the detecting comprises: (a) generating a protective always-on-top layer which is transparent and non-visible to a human user; (b) automatically generating a non-human touch-event in a particular on-screen location of said touch-screen; (c) detecting whether or not said non-human touch-event was actually received at said protective always-on-top layer within M milliseconds of performing step (b); and (d) if the detecting of step (c) indicates that said non-human touch-event was not received at said protective always-on-top layer within M milliseconds of performing step (b), then determining that said overlay malware module is active on the electronic device.

In some embodiments, step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining an estimated on-screen size of the overlay malware module.

In some embodiments, step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining an estimated on-screen location of the overlay malware module.

In some embodiments, step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining which particular User Interface (UI) elements of the victim application, are actually masked by the overlay malware module.

In some embodiments, step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining that a first particular User Interface (UI) element of the victim application is actually masked by the overlay malware module, and further determining that a second, different, UI element of the victim application is concurrently non-masked by the overlay malware module.

In some embodiments, step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining whether (I) the overlay malware module is active and covers an entirety of the touch-screen of the electronic device, or (II) the overlay malware module is active an covers less than the entirety of the touch-screen of the electronic device.

In some embodiments, step (d) comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, detecting and distinguishing between: (I) a first scenario in which the malware module is active and is masking at least a portion of the victim application in order to steal user credentials, and (II) a second scenario in which the victim application is masked by a non-malware always-on-top layer of an application which is not said malware module and is not said victim application.

In some embodiments, step (d) comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, detecting and distinguishing between: (I) a first scenario in which the malware module is active and is masking at least a portion of the victim application in order to steal user credentials, and (II) a second scenario in which the victim application is masked by a non-malware always-on-top layer of an application which is not said malware module and is not said victim application; and (III) a third scenario in which it is determined that no malware module and no other application is currently masking a User Interface of the victim application.

In some embodiments, step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, at pseudo-random time intervals that are pseudo-randomly selected from a range of permissible time-interval values.

In some embodiments, step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, at pseudo-random time intervals that are non-pseudo-randomly selected from a pre-defined set of permissible time-interval values.

In some embodiments, step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, wherein the multiple on-screen locations have a particular pre-defined sequence that indicates in which order said injections are performed in particular on-screen locations.

In some embodiments, step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, wherein the multiple on-screen locations have a particular pre-defined sequence that indicates in which order said injections are performed in a central region of the touch-screen and in corner regions of the touch-screen.

In some embodiments, all of steps (a), (b), (c) and (d) are performed on a non-rooted electronic device.

In some embodiments, all of steps (a), (b), (c) and (d) are performed by a defensive module that does not have root access in said electronic device.

In some embodiments, all of steps (a), (b), (c) and (d) are performed by a defensive module that does not have access to any system logs of the electronic device.

In some embodiments, all of steps (a), (b), (c) and (d) are performed by a defensive module that is implemented as an integral component within said victim application.

In some embodiments, all of steps (a), (b), (c) and (d) are performed by a defensive module that is implemented as an external component which resides in said electronic device and which runs on said electronic device but is a separate application from said victim application.

In some embodiments, if it is determined in step (d) that the overlay malware module is active on the electronic device, then the method comprises activating a local fraud mitigation module that runs locally on said electronic device.

In some embodiments, if it is determined in step (d) that the overlay malware module is active on the electronic device, then the method comprises: automatically transmitting an account-locking signal from said electronic device to a remote server, wherein the account-locking signal indicates to said remote server to block access to a particular user-account on said remote server.

In some embodiments, a system comprises: a defensive module configured to run on an electronic device having a touch-screen, wherein the defensive module automatically detects an overlay malware module that is active on said electronic device, wherein the overlay malware module generates a malicious always-on-top masking layer that covers at least a portion of a content displayed by a victim application running on said electronic device; wherein the defensive module is configured to: (a) generate a protective always-on-top layer which is transparent and non-visible to a human user; (b) automatically generate a non-human touch-event in a particular on-screen location of said touch-screen; (c) detect whether or not said non-human touch-event was actually received at said protective always-on-top layer within M milliseconds of performing step (b); and (d) if the detecting of step (c) indicates that said non-human touch-event was not received at said protective always-on-top layer within M milliseconds of performing step (b), then determine that said overlay malware module is active on the electronic device.

The system(s) of the present invention may optionally comprise, or may be implemented by utilizing suitable hardware components and/or software components; for example, processors, processor cores, Central Processing Units (CPUs), Digital Signal Processors (DSPs), circuits, Integrated Circuits (ICs), controllers, memory units, registers, accumulators, storage units, input units (e.g., touch-screen, keyboard, keypad, stylus, mouse, touchpad, joystick, trackball, microphones), output units (e.g., screen, touch-screen, monitor, display unit, audio speakers), acoustic sensor(s), optical sensor(s), wired or wireless modems or transceivers or transmitters or receivers, GPS receiver or GPS element or other location-based or location-determining unit or system, network elements (e.g., routers, switches, hubs, antennas), and/or other suitable components and/or modules. The system(s) of the present invention may optionally be implemented by utilizing co-located components, remote components or modules, “cloud computing” servers or devices or storage, client/server architecture, peer-to-peer architecture, distributed architecture, and/or other suitable architectures or system topologies or network topologies.

In accordance with embodiments of the present invention, calculations, operations and/or determinations may be performed locally within a single device, or may be performed by or across multiple devices, or may be performed partially locally and partially remotely (e.g., at a remote server) by optionally utilizing a communication channel to exchange raw data and/or processed data and/or processing results.

Although portions of the discussion herein relate, for demonstrative purposes, to wired links and/or wired communications, some embodiments are not limited in this regard, but rather, may utilize wired communication and/or wireless communication; may include one or more wired and/or wireless links; may utilize one or more components of wired communication and/or wireless communication; and/or may utilize one or more methods or protocols or standards of wireless communication.

Some embodiments may be implemented by using a special-purpose machine or a specific-purpose device that is not a generic computer, or by using a non-generic computer or a non-general computer or machine. Such system or device may utilize or may comprise one or more components or units or modules that are not part of a “generic computer” and that are not part of a “general purpose computer”, for example, cellular transceivers, cellular transmitter, cellular receiver, GPS unit, location-determining unit, accelerometer(s), gyroscope(s), device-orientation detectors or sensors, device-positioning detectors or sensors, or the like.

Some embodiments may be implemented as, or by utilizing, an automated method or automated process, or a machine-implemented method or process, or as a semi-automated or partially-automated method or process, or as a set of steps or operations which may be executed or performed by a computer or machine or system or other device.

Some embodiments may be implemented by using code or program code or machine-readable instructions or machine-readable code, which may be stored on a non-transitory storage medium or non-transitory storage article (e.g., a CD-ROM, a DVD-ROM, a physical memory unit, a physical storage unit), such that the program or code or instructions, when executed by a processor or a machine or a computer, cause such processor or machine or computer to perform a method or process as described herein. Such code or instructions may be or may comprise, for example, one or more of: software, a software module, an application, a program, a subroutine, instructions, an instruction set, computing code, words, values, symbols, strings, variables, source code, compiled code, interpreted code, executable code, static code, dynamic code; including (but not limited to) code or instructions in high-level programming language, low-level programming language, object-oriented programming language, visual programming language, compiled programming language, interpreted programming language, C, C++, C#, Java, JavaScript, SQL, Ruby on Rails, Go, Rust, Cobol, Fortran, ActionScript, AJAX, XML, JSON, Lisp, Eiffel, Verilog, Hardware Description Language (HDL, BASIC, Visual BASIC, Matlab, Pascal, HTML, HTML5, CSS, Perl, Python, PHP, machine language, machine code, assembly language, or the like.

Discussions herein utilizing terms such as, for example, “processing”, “computing”, “calculating”, “determining”, “establishing”, “analyzing”, “checking”, “detecting”, “measuring”, or the like, may refer to operation(s) and/or process(es) of a processor, a computer, a computing platform, a computing system, or other electronic device or computing device, that may automatically and/or autonomously manipulate and/or transform data represented as physical (e.g., electronic) quantities within registers and/or accumulators and/or memory units and/or storage units into other data or that may perform other suitable operations.

The terms “plurality” and “a plurality”, as used herein, include, for example, “multiple” or “two or more”. For example, “a plurality of items” includes two or more items.

References to “one embodiment”, “an embodiment”, “demonstrative embodiment”, “various embodiments”, “some embodiments”, and/or similar terms, may indicate that the embodiment(s) so described may optionally include a particular feature, structure, or characteristic, but not every embodiment necessarily includes the particular feature, structure, or characteristic. Furthermore, repeated use of the phrase “in one embodiment” does not necessarily refer to the same embodiment, although it may. Similarly, repeated use of the phrase “in some embodiments” does not necessarily refer to the same set or group of embodiments, although it may.

As used herein, and unless otherwise specified, the utilization of ordinal adjectives such as “first”, “second”, “third”, “fourth”, and so forth, to describe an item or an object, merely indicates that different instances of such like items or objects are being referred to; and does not intend to imply as if the items or objects so described must be in a particular given sequence, either temporally, spatially, in ranking, or in any other ordering manner.

Some embodiments may be used in conjunction with one way and/or two-way radio communication systems, cellular radio-telephone communication systems, a mobile phone, a cellular telephone, a wireless telephone, a Personal Communication Systems (PCS) device, a PDA or handheld device which incorporates wireless communication capabilities, a mobile or portable Global Positioning System (GPS) device, a device which incorporates a GPS receiver or transceiver or chip, a device which incorporates an RFID element or chip, a Multiple Input Multiple Output (MIMO) transceiver or device, a Single Input Multiple Output (SIMO) transceiver or device, a Multiple Input Single Output (MISO) transceiver or device, a device having one or more internal antennas and/or external antennas, Digital Video Broadcast (DVB) devices or systems, multi-standard radio devices or systems, a wired or wireless handheld device, e.g., a Smartphone, a Wireless Application Protocol (WAP) device, or the like.

Some embodiments may operate in conjunction with, or may utilize, one or more systems, devices and/or methods that operate to detect malware and/or stop malware and/or remove malware; and/or operate to detect or stop or remove a computer virus or a “Trojan” module or a “phishing” attack or other cyber-attack or fraud; and/or operate to distinguish between a human user and a “bot” or automatic script or a malicious automatic script; and/or operate to distinguish between (I) a malicious code or malware and (II) a non-malicious code or non-malicious program; and/or operate in conjunction with a system that utilizes user-specific behavior to distinguish among human users and/or to detect automated users or “bots”; and/or operate to inject or introduce an anomaly or aberration or interference or irregularity into the UI of a website or a web-page or an application or an “app” (e.g., an irregular or abnormal or unexpected on-screen behavior or movement of a cursor or pointer in response to user's interactions with input units), and/or to monitor the user's reaction and/or corrective action(s) to such anomaly or aberration.

Some embodiments may comprise, or may be implemented by using, an “app” or application which may be downloaded or obtained from an “app store” or “applications store”, for free or for a fee, or which may be pre-installed on a computing device or electronic device, or which may be otherwise transported to and/or installed on such computing device or electronic device.

Functions, operations, components and/or features described herein with reference to one or more embodiments of the present invention, may be combined with, or may be utilized in combination with, one or more other functions, operations, components and/or features described herein with reference to one or more other embodiments of the present invention. The present invention may thus comprise any possible or suitable combinations, re-arrangements, assembly, re-assembly, or other utilization of some or all of the modules or functions or components that are described herein, even if they are discussed in different locations or different chapters of the above discussion, or even if they are shown across different drawings or multiple drawings.

While certain features of some demonstrative embodiments of the present invention have been illustrated and described herein, various modifications, substitutions, changes, and equivalents may occur to those skilled in the art. Accordingly, the claims are intended to cover all such modifications, substitutions, changes, and equivalents. 

What is claimed is:
 1. A method comprising: automatically detecting that an overlay malware module is active on an electronic device having a touch-screen, wherein the overlay malware module generates a malicious always-on-top masking layer that covers at least a portion of a content displayed by a victim application running on said electronic device.
 2. The method of claim 1, wherein the detecting comprises: (a) generating a protective always-on-top layer which is transparent and non-visible to a human user; (b) automatically generating a non-human touch-event in a particular on-screen location of said touch-screen; (c) detecting whether or not said non-human touch-event was actually received at said protective always-on-top layer within M milliseconds of performing step (b); (d) if the detecting of step (c) indicates that said non-human touch-event was not received at said protective always-on-top layer within M milliseconds of performing step (b), then determining that said overlay malware module is active on the electronic device.
 3. The method of claim 2, wherein step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining an estimated on-screen size of the overlay malware module.
 4. The method of claim 2, wherein step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining an estimated on-screen location of the overlay malware module.
 5. The method of claim 2, wherein step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining which particular User Interface (UI) elements of the victim application, are actually masked by the overlay malware module.
 6. The method of claim 2, wherein step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining that a first particular User Interface (UI) element of the victim application is actually masked by the overlay malware module, and further determining that a second, different, UI element of the victim application is concurrently non-masked by the overlay malware module.
 7. The method of claim 2, wherein step (d) further comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, determining whether (I) the overlay malware module is active and covers an entirety of the touch-screen of the electronic device, or (II) the overlay malware module is active and covers less than the entirety of the touch-screen of the electronic device.
 8. The method of claim 2, wherein step (d) comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, detecting and distinguishing between: (I) a first scenario in which the malware module is active and is masking at least a portion of the victim application in order to steal user credentials, and (II) a second scenario in which the victim application is masked by a non-malware always-on-top layer of an application which is not said malware module and is not said victim application.
 9. The method of claim 2, wherein step (d) comprises: based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, detecting and distinguishing between: (I) a first scenario in which the malware module is active and is masking at least a portion of the victim application in order to steal user credentials, and (II) a second scenario in which the victim application is masked by a non-malware always-on-top layer of an application which is not said malware module and is not said victim application; and (III) a third scenario in which it is determined that no malware module and no other application is currently masking a User Interface of the victim application.
 10. The method of claim 2, wherein step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, at pseudo-random time intervals that are pseudo-randomly selected from a range of permissible time-interval values.
 11. The method of claim 2, wherein step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, at pseudo-random time intervals that are non-pseudo-randomly selected from a pre-defined set of permissible time-interval values.
 12. The method of claim 2, wherein step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, wherein the multiple on-screen locations have a particular pre-defined sequence that indicates in which order said injections are performed in particular on-screen locations.
 13. The method of claim 2, wherein step (d) comprises: determining one or more attributes of the overlay malware module, based on a series of multiple non-human injections of touch-events at multiple, different, on-screen locations, wherein the multiple on-screen locations have a particular pre-defined sequence that indicates in which order said injections are performed in a central region of the touch-screen and in corner regions of the touch-screen.
 14. The method of claim 2, wherein all of steps (a), (b), (c) and (d) are performed on a non-rooted electronic device.
 15. The method of claim 2, wherein all of steps (a), (b), (c) and (d) are performed by a defensive module that does not have root access in said electronic device.
 16. The method of claim 2, wherein all of steps (a), (b), (c) and (d) are performed by a defensive module that does not have access to any system logs of the electronic device.
 17. The method of claim 2, wherein all of steps (a), (b), (c) and (d) are performed by a defensive module that is implemented as an integral component within said victim application.
 18. The method of claim 2, wherein all of steps (a), (b), (c) and (d) are performed by a defensive module that is implemented as an external component which resides in said electronic device and which runs on said electronic device but is a separate application from said victim application.
 19. The method of claim 2, wherein if it is determined in step (d) that the overlay malware module is active on the electronic device, then the method comprises activating a local fraud mitigation module that runs locally on said electronic device.
 20. The method of claim 2, wherein if it is determined in step (d) that the overlay malware module is active on the electronic device, then the method comprises automatically transmitting an account-locking signal from said electronic device to a remote server, wherein the account-locking signal indicates to said remote server to block access to a particular user-account on said remote server.
 21. A system comprising: a defensive module configured to run on an electronic device having a touch-screen, wherein the defensive module automatically detects an overlay malware module that is active on said electronic device, wherein the overlay malware module generates a malicious always-on-top masking layer that covers at least a portion of a content displayed by a victim application running on said electronic device; wherein the defensive module is configured to: (a) generate a protective always-on-top layer which is transparent and non-visible to a human user; (b) automatically generate a non-human touch-event in a particular on-screen location of said touch-screen; (c) detect whether or not said non-human touch-event was actually received at said protective always-on-top layer within M milliseconds of performing step (b); and (d) if the detecting of step (c) indicates that said non-human touch-event was not received at said protective always-on-top layer within M milliseconds of performing step (b), then determine that said overlay malware module is active on the electronic device. 